﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MeterReader.WPF.ViewModels
{
	public class MessageViewModel : BindableBase, IDialogAware
	{

		public string Title { get; set; } = "报错信息";
		public DialogCloseListener RequestClose { get; set; }

		public bool CanCloseDialog()
		{
			return true;
		}

		public void OnDialogClosed()
		{
			
		}

		public void OnDialogOpened(IDialogParameters parameters)
		{
			var value = parameters.GetValue<string>("fault");
			Msg =value;
		}

		private string _msg;
		public string Msg
		{
			get { return _msg; }
			set { SetProperty(ref _msg, value); }
		}
	}
}
